package com.mocha.exception;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.servlet.ModelAndView;

@ControllerAdvice
public class HandlerException {

    @ExceptionHandler({RuntimeException.class})
    public ModelAndView testExceptionHandler() {
        ModelAndView mv = new ModelAndView("error");
        return mv;
    }
    
}
